<template>
  <div class="fics">
 <NavbarFics />
    <b-container>
      <div class="card">
        <div class="card-header">信德网 / 专题</div>
        <div class="card-body">
          <div class="row">
            <div class="col-md-6 mb-3" v-for="item in list" :key="item.id">
              <router-link :to="getUrl(item)">
                <img class="img-fluid" v-lazy="domain + item.banner">
              </router-link>
            </div>
          </div>
        </div>
      </div>
    </b-container>
    <FooterIndex msg="Welcome to Your Vue.js App" />
  </div>
</template>

<script>
// @ is an alias to /src
import FooterIndex from "@/components/FooterIndex.vue";
import NavbarFics from "@/components/NavbarFics.vue";
import { mapState, mapActions } from "vuex";

export default {
  name: "fics",
  components: {
    NavbarFics,
    FooterIndex
  },
  data () {
     return { domain: process.env.VUE_APP_baseURL }
  },
  computed: {
    ...mapState({
      list: state => state.special.list
    })
  },
  created () {
    this.setList()
    // console.log(this.list)
  },
  methods: {
    ...mapActions('special', ['setList']),
    getUrl (item) {
      if (item.is_proseminar == 0) {
        return 'specialshow/' + item.id
      } else {
        return 'proseminarshow/' + item.id
      }
    }
  }
}
</script>

<style>
</style>

